﻿@*@model IEnumerable<BanDTBLL.tintuc>*@

@model PagedList.IPagedList<BanDTBLL.tintuc>
<p>
    @Html.ActionLink("Đăng bài mới", "Create")
</p>
@foreach (var item in Model)
{
    <table>
    <tr>
        
         <td>
            <img alt="df" src="../../Content/themes/images/@Html.DisplayFor(modelItem => item.hinhanh)" width="80px" height="80px"/>
        </td>
        <td  style = " color:blue; font-size:16px; font-weight:bold">
            <a style="text-decoration:none" href="Details/@item.ma">@item.tieude</a>
         </td>
    </tr>
    </table>
}
<div>
    Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    of @Model.PageCount
     
    @if (Model.HasPreviousPage)
    {
        @Html.ActionLink("<<", "W_Index", new { page = 1})
        @Html.Raw(" ");
        @Html.ActionLink("< Prev", "W_Index", new { page = Model.PageNumber - 1 })
    }
    else
    {
        @:<<
        @Html.Raw(" ");
        @:< Prev
    }
     
    @if (Model.HasNextPage)
    {
        @Html.ActionLink("Next >", "W_Index", new { page = Model.PageNumber + 1 })
        @Html.Raw(" ");
        @Html.ActionLink(">>", "W_Index", new { page = Model.PageCount })
    }
    else
    {
        @:Next >
        @Html.Raw(" ")
        @:>>
    }
</div>
